package cn.neusoft.service;

import cn.neusoft.domain.*;
import cn.neusoft.query.BaseQuery;
import cn.neusoft.vo.ExchangeOrderBean;
import cn.neusoft.vo.NormalOrderBean;
import cn.neusoft.vo.PageBean;
import cn.neusoft.vo.ReturnOrderBean;

import java.util.List;
import java.util.Map;

public interface OrderService {
  Long findOccupiedAmount(String commodity_id);//查询库存量
  Long findNormalOrderAmount(String commodity_id);//查询正常订单订货数
  Long findExchangeOrderAmount(String commodity_id);//查询换货订单订货数
  Long findTrueAmount(String commodity_id);//查询实时库存量
  void judgeAmount(Order order);//修改订单状态
  void addOrder(Order order);//新增父类型订单
  List<Order> findAll();
  void addOrder_normal(Order_normal order_normal);//新增子类型正常订单
  void addOrder_exchange(Order_exchange order_exchange);//新增子类型换货订单
  void addOrder_return(Order_return order_return);//新增子类型换货订单
  void updateoccupamount(String commodity_id,Long occupied_amount);//修改虚拟库存
  PageBean<Order> findCustoOrderByPage(BaseQuery query);//查询客户下属订单
  NormalOrderBean findNormalOrder(Order order);  //查询正常订单
  ExchangeOrderBean findExchangeOrder(Order order);  //查询换货订单
  ReturnOrderBean findReturnOrder(Order order);  //查询退货订单

  PageBean<NormalOrderBean> findNormalOrderByPage(BaseQuery query);

  PageBean<ExchangeOrderBean> findExchangeOrderByPage(BaseQuery query);

  PageBean<ReturnOrderBean> findReturnOrderByPage(BaseQuery query);

  Order1 findOrderNormalByCondition(BaseQuery query);

  Order1 findOrderExchangeByCondition(BaseQuery query);

  Order1 findOrderReturnByCondition(BaseQuery query);

  PageBean<Order1> findOrderByPage(BaseQuery query);

  void updateOrderStatus(Order1 order);

  void updateOrderStatusWhenCreate(Order order);

  void updateOrderRestock(Order order);

  int countMatchingOrders(String commodity_id);
}
